package org.hxd.admin.user.dao;

import org.apache.ibatis.annotations.*;
import org.hxd.pojo.ProductList;
import org.hxd.pojo.Products;
import org.hxd.pojo.User;
import org.hxd.utils.PageModel;

import java.util.List;

public interface AdminUserDao {
    @Select("select * from user where username = #{username} and password = #{password}")
    User yLoginuser(User user);

    List<Products> findTJproducts(@Param("products") Products products, @Param("minprice") Double minprice, @Param("maxprice") Double maxprice, @Param("pageModel") PageModel pageModel);

    @Insert("insert into products values(#{id},#{name},#{price},#{category},#{pnum},#{imgurl},#{description})")
    int addProducts(Products products);

    @Delete("delete from products where id = #{id}")
    int deleteProduct(String id);

    int findProductsCount(@Param("products") Products products, @Param("minprice") Double minprice, @Param("maxprice") Double maxprice);

    int updateProduct(Products products);

    List<ProductList> finProductSalList(@Param("year") String year,@Param("month") String month);
}




























